﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NewsPortal.Models.PortalModel>" %>

<table>
    
<%
    for (int i = 0; i < Model.MainNewses.Length; i++)
    {
%>	
    <tr valign="top">			
        <td class="<%=(i == 0 ? "last" : "other")%>">                            
            <a href="/News?id=<% =Model.MainNewses[i].Id%>">
                <h2><% =Model.MainNewses[i].Title%></h2>
                <img class="newsImage" alt=""<% =Model.MainNewses[i].Title%>" src="/images/image?id=<% =Model.MainNewses[i].PictureId%>&small=true"/><br>
            </a>
            <div class="dt">
                <% =Model.MainNewses[i].Moment.ToString("G")%>
            </div>
            <% =Model.MainNewses[i].ShortText%><br>                                        
		</td>
    </tr>	
        <%
    }%>     
    
</table>